<?php

$dp;

$sql = "SELECT * FROM mt_karyawan";

$cont = new GCD($sql);
$cont->getColumnInfo();
$cont->getResultSet("", "", "100");


setPageTitle("Data Rekan");
$add_header_items = "\n<script type=\"text/javascript\" src=\"". $__CFG_http_js ."jquery.js\"></scr"."ipt>\n<script type=\"text/javascript\" src=\"". $__CFG_http_js ."jquery.validate.js\"></scr"."ipt>\n<script type=\"text/javascript\" src=\"". $__CFG_http_js ."validate_staff_child.js\"></scr"."ipt>";
require_once($__CFG_dir_adminlayout . $__CFG_site_adminlayout."/header_popup.php");


?>
<script language="javascript" type="text/javascript">
	
	function getValueSingle(kode, nama) {
		try {
			parent.parent._obj_fSendValue(kode, nama, 'nik', 'nama');
		}
		catch(e) { alert(e.message); }
		parent.parent.focus();

		<?php echo CloseGB(false); // close grebox?>
                 
	}
</script>

<h3 class="title-popup">Data Rekan</h3>

<div class="DivTable">
<table class="GridTable">
<tr class="GridHeader">
<td>No.</td>
<td>NIK</td>
<td>Nama Rekan</td>
</tr>
<?php

if($cont->countListData() > 0) {
	$nomor = $i;
	foreach($cont->listData() as $row) {
		$nomor++;
		
		$styleTR = "GridItem1";

?>
		<tr class="<?php echo  $styleTR;?>" onclick="getValueSingle('<?php echo $row->nik;?>', '<?php echo $row->nama;?>')">
		<td><?php echo  $nomor;?></td>
		<td><?php echo  $row->nik;?></td>
		<td><?php echo  $row->nama;?>
                    <input type="hidden" name="vNama" value="<?php echo str_replace("'", "\'", $row->nama); ?>" /></td>
		</tr>
<?php
	}

}
else {
?>
	<tr class="GridItem1">
		<td colspan="3">Tidak ada data</td>
	</tr>

<?php
}
?>
</table>
</div>

<br class="bersih" />
